********************************************************************************************************************************
***   Replication file for:                                                                                                  ***
***   Berbee, P., Braun, S. T. and Franke, R. (2024). Reversing Fortunes of German Regions, 1926-2019. JoEG.			     ***
***   							                                                                                             ***
***   SCRIPT: 	5_reversal_inequality.do																			 		 ***	
***   PURPOSE: 	Generates the figures and tables in Section 5 ("North-south reversal and changing inequality")				 ***
***	  			and the associated Appendix A-4.																			 ***
***	  Tables:	4, 5, A-9, A-10																								 ***
***	  Figures:	A-6, A-8, A-9 																								 ***
********************************************************************************************************************************


* Preamble (unnecessary when executing run.do)
run "$reversing/scripts/programs/_config.do"

************
* Code begins
************

use "$reversing/processed/workingdataset.dta", clear


********************************************************************************
*** Table 4: Mean differences in income ranks between northern and southern labor markets

** Panel A: Ranks

** Regressions
local covariates log_land_access1 town_1700_perarea
local years "1926 1957 2019"
foreach year in `years' {
** Panel A: Actual mean differences
eststo mean_`year'_co: acreg rank_perc north1  if year == `year', latitude(latitude) longitude(longitude) spatial bartlett distcutoff(100)  
eststo mean_`year'_cl: reg rank_perc north1  if year == `year', cluster(rb_id)  
** Panel B: Predicted mean differences 
ivreg2 rank_perc (empshare_ind_1882_std=log_coal_access1)  `covariates' if year == `year', cluster(rb_id) 
gen fitted_GDP = _b[empshare_ind_1882_std] * empshare_ind_1882_std
eststo predmean_`year'_co: acreg fitted_GDP north1  if year == `year', latitude(latitude) longitude(longitude) spatial bartlett distcutoff(100)  
eststo predmean_`year'_co: reg fitted_GDP north1 if year == `year', cluster(rb_id) 
drop fitted_GDP
}

** Export table to latex 
esttab mean_1926_co mean_1957_co mean_2019_co  using"$reversing/results/tables/tab4_panelA.tex", keep(north1) coeflabel(north1 "Actual mean difference") plain fragment noobs  nomtitles collabel(none) parentheses se b(%5.2f) se(%5.2f) booktabs replace substitute(\_ _) //star(* 0.10 ** 0.05 *** 0.01) 
esttab predmean_1926_co predmean_1957_co predmean_2019_co using"$reversing/results/tables/tab4_panelA.tex", keep(north1) coeflabel(north1 "Predicted mean difference") plain fragment noobs nomtitles collabel(none) parentheses se b(%5.2f) se(%5.2f)  booktabs append substitute(\_ _) //star(* 0.10 ** 0.05 *** 0.01)

** Panel B: Log GDP per capita

gen log_income = log_realpcGDP
replace log_income = log_realpcturnover if year == 1926

** Regressions
local covariates log_land_access1 town_1700_perarea
local years "1926 1957 2019"
foreach year in `years' {
** Panel A: Actual mean differences
eststo mean_`year'_co: acreg log_income north1  if year == `year', latitude(latitude) longitude(longitude) spatial bartlett distcutoff(100)  
eststo mean_`year'_cl: reg log_income north1  if year == `year', cluster(rb_id)  
** Panel B: Predicted mean differences 
ivreg2 log_income (empshare_ind_1882_std=log_coal_access1)  `covariates' if year == `year', cluster(rb_id) 
gen fitted_GDP = _b[empshare_ind_1882_std] * empshare_ind_1882_std
eststo predmean_`year'_co: acreg fitted_GDP north1  if year == `year', latitude(latitude) longitude(longitude) spatial bartlett distcutoff(100)  
eststo predmean_`year'_co: reg fitted_GDP north1 if year == `year', cluster(rb_id) 
drop fitted_GDP
}

** Export table to latex 
esttab mean_1926_co mean_1957_co mean_2019_co  using"$reversing/results/tables/tab4_panelB.tex", keep(north1) coeflabel(north1 "Actual mean difference") plain fragment noobs  nomtitles collabel(none) parentheses se b(%5.3f) se(%5.3f) booktabs replace substitute(\_ _) //star(* 0.10 ** 0.05 *** 0.01) 
esttab predmean_1926_co predmean_1957_co predmean_2019_co using"$reversing/results/tables/tab4_panelB.tex", keep(north1) coeflabel(north1 "Predicted mean difference") plain fragment noobs nomtitles collabel(none) parentheses se b(%5.3f) se(%5.3f)  booktabs append substitute(\_ _) //star(* 0.10 ** 0.05 *** 0.01)




********************************************************************************
*** Table 5 (and A-9): Components of changes in regional per capita income, 1957-2019
*** (unweighted inequality measures based on estimates reported in the paper)
*** Note: We first reshape data to wide format so that we can run bootstrap
*** w/o the nodrop option

preserve

*** Prepare wide data set

clear all 
use "$reversing/processed/workingdataset.dta", clear
keep if inlist(year, 1957, 1980, 2019)

keep log_realpcGDP realpcGDP population empshare_ind_1882_std log_coal_access1 log_land_access1 town_1700_perarea rb_id labor_market_id year 

reshape wide log_realpcGDP realpcGDP population, i(labor_market_id) j(year)


*** Program for calculating inequality measures
program northsouth, rclass /* First and only argument is metric (sd, cv, iqr, gini, p9010) */
	
version 18
	
*** Counterfactual changes in Regional Disparities:
local years "1957 1980 2019"
local covariates log_land_access1 town_1700_perarea
foreach year in `years' {
gen industry_effect`year' = .
ivreg2 log_realpcGDP`year' (empshare_ind_1882_std=log_coal_access1)  `covariates', cluster(rb_id)
replace industry_effect`year' = _b[empshare_ind_1882_std] * empshare_ind_1882_std 

* Hypothetical y if all regions had average share_ind_1882
gen log_realpcGDP_wo_diff`year' = log_realpcGDP`year' - industry_effect`year'
gen realpcGDP_wo_diff`year' = exp(log_realpcGDP_wo_diff`year')

}

** Various inequality measures

	if ("`1'"=="sd" | "`1'"=="iqr") {
		
	tabstat log_realpcGDP1957 log_realpcGDP_wo_diff1957 log_realpcGDP1980 log_realpcGDP_wo_diff1980 log_realpcGDP2019 log_realpcGDP_wo_diff2019, col(s) format(%12.3fc) stat("`1'") save
	
	display as text "Actual inequality 1957 (`1') = " as result %9.3f r(StatTotal)[1,1]
	display as text "Actual inequality 1980 (`1') = " as result %9.3f r(StatTotal)[1,3]
	display as text "Actual inequality 2019 (`1') = " as result %9.3f r(StatTotal)[1,5]
	
	display as text "Counterfactual inequality 1957 (`1') = " as result %9.3f r(StatTotal)[1,2]
	display as text "Counterfactual inequality 1980 (`1') = " as result %9.3f r(StatTotal)[1,4]
	display as text "Counterfactual inequality 2019 (`1') = " as result %9.3f r(StatTotal)[1,6]
		
	scalar change_factual_1957_1980 = r(StatTotal)[1,3] - r(StatTotal)[1,1]
	display as text "Change in actual inequality 1957-1980 (`1') = " as result %9.3f change_factual_1957_1980
	
	scalar change_factual_1980_2019 = r(StatTotal)[1,5] - r(StatTotal)[1,3]
	display as text "Change in actual inequality 1980-2019 (`1') = " as result %9.3f change_factual_1980_2019
	
	scalar change_factual_1957_2019 = r(StatTotal)[1,5] - r(StatTotal)[1,1]
	display as text "Change in actual inequality 1957-2019 (`1') = " as result %9.3f change_factual_1957_2019
	
	scalar change_cfactual_1957_1980 = r(StatTotal)[1,4] - r(StatTotal)[1,2]
	display as text "Change in counterfactual inequality 1957-1980 (`1') = " as result %9.3f change_cfactual_1957_1980
	
	scalar change_cfactual_1980_2019 = r(StatTotal)[1,6] - r(StatTotal)[1,4]
	display as text "Change in counterfactual inequality 1980-2019 (`1') = " as result %9.3f change_cfactual_1980_2019
	
	scalar change_cfactual_1957_2019 = r(StatTotal)[1,6] - r(StatTotal)[1,2]
	display as text "Change in counterfactual inequality 1957-2019 (`1') = " as result %9.3f change_cfactual_1957_2019
	
	* Results to be bootstrapped
	
	return scalar diff_1957 =  r(StatTotal)[1,1] - r(StatTotal)[1,2]
	return scalar diff_1980 =  r(StatTotal)[1,3] - r(StatTotal)[1,4]
	return scalar diff_2019 =  r(StatTotal)[1,5] - r(StatTotal)[1,6]

	return scalar diff_1957_1980 = (r(StatTotal)[1,3] - r(StatTotal)[1,4]) - (r(StatTotal)[1,1] - r(StatTotal)[1,2])
	return scalar diff_1980_2019 = (r(StatTotal)[1,5] - r(StatTotal)[1,6]) - (r(StatTotal)[1,3] - r(StatTotal)[1,4])
	return scalar diff_1957_2019 = (r(StatTotal)[1,5] - r(StatTotal)[1,6]) - (r(StatTotal)[1,1] - r(StatTotal)[1,2])
	
	}
	
	if ("`1'"=="cv") {
		
	tabstat realpcGDP1957 realpcGDP_wo_diff1957 realpcGDP1980 realpcGDP_wo_diff1980 realpcGDP2019 realpcGDP_wo_diff2019, col(s) format( %12.4fc) stat("`1'") save
	
	display as text "Actual inequality 1957 (`1') = " as result %9.3f r(StatTotal)[1,1]
	display as text "Actual inequality 1980 (`1') = " as result %9.3f r(StatTotal)[1,3]
	display as text "Actual inequality 2019 (`1') = " as result %9.3f r(StatTotal)[1,5]
	
	display as text "Counterfactual inequality 1957 (`1') = " as result %9.3f r(StatTotal)[1,2]
	display as text "Counterfactual inequality 1980 (`1') = " as result %9.3f r(StatTotal)[1,4]
	display as text "Counterfactual inequality 2019 (`1') = " as result %9.3f r(StatTotal)[1,6]
		
	scalar change_factual_1957_1980 = r(StatTotal)[1,3] - r(StatTotal)[1,1]
	display as text "Change in actual inequality 1957-1980 (`1') = " as result %9.3f change_factual_1957_1980
	
	scalar change_factual_1980_2019 = r(StatTotal)[1,5] - r(StatTotal)[1,3]
	display as text "Change in actual inequality 1980-2019 (`1') = " as result %9.3f change_factual_1980_2019
	
	scalar change_factual_1957_2019 = r(StatTotal)[1,5] - r(StatTotal)[1,1]
	display as text "Change in actual inequality 1957-2019 (`1') = " as result %9.3f change_factual_1957_2019
	
	scalar change_cfactual_1957_1980 = r(StatTotal)[1,4] - r(StatTotal)[1,2]
	display as text "Change in counterfactual inequality 1957-1980 (`1') = " as result %9.3f change_cfactual_1957_1980
	
	scalar change_cfactual_1980_2019 = r(StatTotal)[1,6] - r(StatTotal)[1,4]
	display as text "Change in counterfactual inequality 1980-2019 (`1') = " as result %9.3f change_cfactual_1980_2019
	
	scalar change_cfactual_1957_2019 = r(StatTotal)[1,6] - r(StatTotal)[1,2]
	display as text "Change in counterfactual inequality 1957-2019 (`1') = " as result %9.3f change_cfactual_1957_2019
	
	* To be bootstrapped
	
	return scalar diff_1957 =  r(StatTotal)[1,1] - r(StatTotal)[1,2]
	return scalar diff_1980 =  r(StatTotal)[1,3] - r(StatTotal)[1,4]
	return scalar diff_2019 =  r(StatTotal)[1,5] - r(StatTotal)[1,6]

	return scalar diff_1957_1980 = (r(StatTotal)[1,3] - r(StatTotal)[1,4]) - (r(StatTotal)[1,1] - r(StatTotal)[1,2])
	return scalar diff_1980_2019 = (r(StatTotal)[1,5] - r(StatTotal)[1,6]) - (r(StatTotal)[1,3] - r(StatTotal)[1,4])
	return scalar diff_1957_2019 = (r(StatTotal)[1,5] - r(StatTotal)[1,6]) - (r(StatTotal)[1,1] - r(StatTotal)[1,2])
	
	}
	
	
	if "`1'"=="gini" {
	
	foreach year in `years' {
		
	ineqdeco realpcGDP`year' 	
	local gini_`year' = r(gini)
	
	ineqdeco realpcGDP_wo_diff`year'
	local gini_wo_`year' = r(gini)
	
	}
	
	display as text "Actual inequality 1957 (`1') = " as result %9.3f `gini_1957'
	display as text "Actual inequality 1980 (`1') = " as result %9.3f `gini_1980'
	display as text "Actual inequality 2019 (`1') = " as result %9.3f `gini_2019'
	
	display as text "Counterfactual inequality 1957 (`1') = " as result %9.3f `gini_wo_1957'
	display as text "Counterfactual inequality 1980 (`1') = " as result %9.3f `gini_wo_1980'
	display as text "Counterfactual inequality 2019 (`1') = " as result %9.3f `gini_wo_2019'
		
	scalar change_factual_1957_1980 = `gini_1980' - `gini_1957'
	display as text "Change in actual inequality 1957-1980 (`1') = " as result %9.3f change_factual_1957_1980
	
	scalar change_factual_1980_2019 = `gini_2019' - `gini_1980'
	display as text "Change in actual inequality 1980-2019 (`1') = " as result %9.3f change_factual_1980_2019
	
	scalar change_factual_1957_2019 = `gini_2019' - `gini_1957'
	display as text "Change in actual inequality 1957-2019 (`1') = " as result %9.3f change_factual_1957_2019
	
	scalar change_cfactual_1957_1980 = `gini_wo_1980' - `gini_wo_1957'
	display as text "Change in counterfactual inequality 1957-1980 (`1') = " as result %9.3f change_cfactual_1957_1980
	
	scalar change_cfactual_1980_2019 = `gini_wo_2019' - `gini_wo_1980'
	display as text "Change in counterfactual inequality 1980-2019 (`1') = " as result %9.3f change_cfactual_1980_2019
	
	scalar change_cfactual_1957_2019 = `gini_wo_2019' - `gini_wo_1957'
	display as text "Change in counterfactual inequality 1957-2019 (`1') = " as result %9.3f change_cfactual_1957_2019
	
	return scalar diff_1957 =  `gini_1957' - `gini_wo_1957' 
	return scalar diff_1980 =  `gini_1980' - `gini_wo_1980'
	return scalar diff_2019 =  `gini_2019' - `gini_wo_2019'

	return scalar diff_1957_1980 = (`gini_1980' - `gini_wo_1980') - (`gini_1957' - `gini_wo_1957')
	return scalar diff_1980_2019 = (`gini_2019' - `gini_wo_2019') - (`gini_1980' - `gini_wo_1980')	
	return scalar diff_1957_2019 = (`gini_2019' - `gini_wo_2019') - (`gini_1957' - `gini_wo_1957')	
		
	}
	
	if "`1'"=="p9010" {
		
	foreach year in `years' {
			ineqdeco realpcGDP`year'
			local p9010_`year' = r(p90p10)
			ineqdeco realpcGDP_wo_diff`year'
			local p9010_wo_`year' = r(p90p10)
			}
			
	display as text "Actual inequality 1957 (`1') = " as result %9.3f `p9010_1957'
	display as text "Actual inequality 1980 (`1') = " as result %9.3f `p9010_1980'
	display as text "Actual inequality 2019 (`1') = " as result %9.3f `p9010_2019'
	
	display as text "Counterfactual inequality 1957 (`1') = " as result %9.3f `p9010_wo_1957'
	display as text "Counterfactual inequality 1980 (`1') = " as result %9.3f `p9010_wo_1980'
	display as text "Counterfactual inequality 2019 (`1') = " as result %9.3f `p9010_wo_2019'
		
	scalar change_factual_1957_1980 = `p9010_1980' - `p9010_1957'
	display as text "Change in actual inequality 1957-1980 (`1') = " as result %9.3f change_factual_1957_1980
	
	scalar change_factual_1980_2019 = `p9010_2019' - `p9010_1980'
	display as text "Change in actual inequality 1980-2019 (`1') = " as result %9.3f change_factual_1980_2019
	
	scalar change_factual_1957_2019 = `p9010_2019' - `p9010_1957'
	display as text "Change in actual inequality 1957-2019 (`1') = " as result %9.3f change_factual_1957_2019
	
	scalar change_cfactual_1957_1980 = `p9010_wo_1980' - `p9010_wo_1957'
	display as text "Change in counterfactual inequality 1957-1980 (`1') = " as result %9.3f change_cfactual_1957_1980
	
	scalar change_cfactual_1980_2019 = `p9010_wo_2019' - `p9010_wo_1980'
	display as text "Change in counterfactual inequality 1980-2019 (`1') = " as result %9.3f change_cfactual_1980_2019
	
	scalar change_cfactual_1957_2019 = `p9010_wo_2019' - `p9010_wo_1957'
	display as text "Change in counterfactual inequality 1957-2019 (`1') = " as result %9.3f change_cfactual_1957_2019
	
	return scalar diff_1957 =  `p9010_1957' - `p9010_wo_1957' 
	return scalar diff_1980 =  `p9010_1980' - `p9010_wo_1980'
	return scalar diff_2019 =  `p9010_2019' - `p9010_wo_2019'

	return scalar diff_1957_1980 = (`p9010_1980' - `p9010_wo_1980') - (`p9010_1957' - `p9010_wo_1957')
	return scalar diff_1980_2019 = (`p9010_2019' - `p9010_wo_2019') - (`p9010_1980' - `p9010_wo_1980')	
	return scalar diff_1957_2019 = (`p9010_2019' - `p9010_wo_2019') - (`p9010_1957' - `p9010_wo_1957')	
	
	}
	
drop industry_effect* log_realpcGDP_wo_diff* realpcGDP_wo_diff*

end

* Report unweighted measures; bootstrap ``industry effect'' 

northsouth sd 
bootstrap r(diff_1957) r(diff_1980) r(diff_2019) r(diff_1957_1980) r(diff_1980_2019) r(diff_1957_2019), reps(200) seed (1234) cformat(%9.3f): northsouth sd 

northsouth cv 
bootstrap r(diff_1957) r(diff_1980) r(diff_2019) r(diff_1957_1980) r(diff_1980_2019) r(diff_1957_2019), reps(200) seed (1234): northsouth cv 

northsouth gini 
bootstrap r(diff_1957) r(diff_1980) r(diff_2019) r(diff_1957_1980) r(diff_1980_2019) r(diff_1957_2019), reps(200) seed (1234): northsouth gini 

northsouth p9010 
bootstrap r(diff_1957) r(diff_1980) r(diff_2019) r(diff_1957_1980) r(diff_1980_2019) r(diff_1957_2019), reps(200) seed (1234): northsouth p9010 

restore

********************************************************************************
*** Table A-10: Decomposition of changes in sigma_yt , 1957-2019

** Here we just calculate the missing inputs for the table, namely the standard deviation of y* for the different periods

preserve

keep if inlist(year, 1957, 1980, 2019)


*** Counterfactual changes in Regional Disparities:
local years "1957 1980 2019"
local covariates log_land_access1 town_1700_perarea
gen industry_effect = .
foreach year in `years' {
ivreg2 log_realpcGDP (empshare_ind_1882_std=log_coal_access1)  `covariates' if year == `year', cluster(rb_id)
replace industry_effect = _b[empshare_ind_1882_std] * empshare_ind_1882_std if year==`year'
gen beta_`year' = _b[empshare_ind_1882_std]
} 


** 1957-1980
gen log_realpcGDP_c_1957_1980 = log_realpcGDP - (beta_1980 - beta_1957) * empshare_ind_1882_std if year==1980
egen log_realpcGDP_c_1957_1980_sd=sd(log_realpcGDP_c_1957_1980) if year == 1980

** 1957-2019
gen log_realpcGDP_c_1957_2019 = log_realpcGDP - (beta_2019 - beta_1957) * empshare_ind_1882_std if year==2019
egen log_realpcGDP_c_1957_2019_sd=sd(log_realpcGDP_c_1957_2019) if year == 2019

** 1980-2019
gen log_realpcGDP_c_1980_2019 = log_realpcGDP - (beta_2019 - beta_1980) * empshare_ind_1882_std if year==2019
tabstat log_realpcGDP_c_1957_1980 log_realpcGDP_c_1980_2019 log_realpcGDP_c_1957_2019, col(s) format( %12.4fc) stat(sd)

restore


************
* Figure A-6
* Per capita income rank of northern versus southern German labor markets in 1926 and 2019

preserve

keep labor_market_id labor_market_name year rank_perc realpcGDP realturnoverpc change_perc_2619 empshare_ind_1882_std north1 
reshape wide rank_perc realpcGDP realturnoverpc, i(labor_market_id) j(year)

*** Figure with marker for Northern labor markets, 45 degree line, and regression line

#delimit ;	
		twoway (scatter rank_perc2019 rank_perc1926 if north1 == 1, sort mcolor(gs2%50))
		(scatter rank_perc2019 rank_perc1926 if north1 == 0, sort mcolor(gs12%50))
		(line rank_perc2019 rank_perc2019 if north1 == 0, sort lcolor(black) lpattern(dot))
		(lfit rank_perc2019 rank_perc1926, sort lcolor(red)),
		xtitle("Percentile rank 1926", size(normal) margin(small))
		ytitle("Percentile rank 2019", size(normal) margin(small))
		plotregion(style(none) lcolor(none))  
		xlabel(0(10)100, nogrid) 
		ylabel(0(10)100, nogrid)
		graphregion(fcol(white) lcol(white)) 
		yline(50, lcolor(gs10) lpattern(dash))
		xline(50, lcolor(gs10) lpattern(dash))
		legend(order(1 "North" 2 "South") pos(6) row(1) region(lpattern(solid) lcolor(black)))
;
#delimit cr	

graph export "$reversing/results/figures/figA6.eps", replace

restore



********************************************************************************
*** Figure A-8: Percentile rank differences between North and South German labor 
*** markets, alternative classiffications, 1926-2019


* Loop over 3 north-defintions
foreach north in north1 north2 north3{
	local years "1926 1935 1950 1957 1961 1970 1980 1992 2000 2010 2019"
matrix C90 = J(3,11,.)
matrix C95 = J(3,11,.)
local j = 1
foreach year in `years' {
		acreg rank_perc `north' if year == `year', latitude(latitude) longitude(longitude) spatial bartlett distcutoff(100) 
		lincom `north', level(90)
		matrix C90[1,`j']= r(estimate) \ r(lb) \ r(ub)
		lincom `north', level(95)
		matrix C95[1,`j']= r(estimate) \ r(lb) \ r(ub)
		local ++j
}

local colnames
foreach year in `years' {
    local colnames `colnames' `year'
}
matrix colnames C90 = `colnames'
matrix list C90

matrix colnames C95 = `colnames'
matrix list C95

coefplot (matrix(C95), ci((C95[2] C95[3])) mcolor(black) ciopts(lpattern(solid) lcolor(black) msize(medlarge) recast(rcap))) (matrix(C90), ci((C90[2] C90[3])) mcolor(black) ciopts(lpattern(solid) lcolor(gray) lwidth(medium) mcolor(gray) msize(medlarge) recast(rcap))), xtitle("Year") yline(0, lcolor(red)) vertical graphregion(color(white)) at(_coef) xlabel(1930(10)2020) ylabel(-40 (10) 30)  ciopts(recast(rcap)) ytitle("Income per capita (percentile ranks)") legend(off)

graph export "$reversing/results/figures/figA8_`north'.eps", replace
}
	
	
	

	
********************************************************************************
*** Figure A-9: Average industrial employment shares in northern and southern labor markets,
*** 1882-2019
	
*** Fill variable empshare_prod_industry with data from 1882, 1907, 1939, 1950, 1961, 1970, and 1987 censuses

preserve

collapse empshare_ind_1882 empshare_ind_1907 empshare_ind_1939 empshare_ind_1950 empshare_indust_1950 empshare_indust_1961 empshare_indust_1970 empshare_indust_1987 empshare_prod_industry, by(north1 year)
drop if empshare_prod_industry==. & year<1980
drop empshare_ind_1950
rename empshare_indust_* empshare_ind_* 

reshape long empshare_ind_, j(jahr) i(north1 year)
replace year=jahr if year==1980
replace empshare_prod_industry=empshare_ind_ if year<1992
drop if year>=1992 & jahr>1882 /* keep just one obs per year */
drop empshare_ind_ jahr
drop if north1==.

reshape wide empshare_prod_industry, i(year) j(north1)

twoway (line empshare_prod_industry1 year, lcolor(gs4)) (line empshare_prod_industry0 year,  lcolor(gs12)) (scatter empshare_prod_industry1 year, mcolor(gs4) msymbol(O) legend(label(3 "North")) ) (scatter empshare_prod_industry0 year, mcolor(gs12) msymbol(T) legend(label(4 "South"))), xlabel(1880 (20) 2020) legend(order(3 4)) name(indempnorthsouth, replace) graphregion(color(white))

graph export "$reversing/results/figures/figA9.eps", replace
	
restore	






*** EOF